package com.foreknow.demo9;
//有十万个数据，去掉所有重复的数据
import java.util.*;

public class Test2 {
    public static void main(String[] args) {
        List<Integer> integers = new ArrayList<>();
        Random random = new Random();
        for (int i = 0;i < 100000;i++){
            integers.add(random.nextInt(100));
        }
        Set<Integer> set = new TreeSet<>();
        set.addAll(integers);
        for (int i:set) {
            System.out.println(i);
        }
    }
}
